#ifndef _TOLUACLASS_H_
#define _TOLUACLASS_H_
#include <iostream>
//tolua_begin
class CBase
{
public:
	CBase(){}
	virtual ~CBase(){}

	virtual void ShowMessage()
	{
		printf("BaseClass\n");
	}

	static char* ClassName()
	{
		return "CBase\n";
	}
};

class CDerived1 :public CBase
{
public:
	CDerived1(){}
	~CDerived1(){}

	void ShowMessage()
	{
		printf("CDerived1Class\n");
	}

	void ShowDerived1()
	{
		printf("show derived1\n");
	}
};

class CDerived2 :public CBase
{
public:
	CDerived2()
	{
		m_nNumber = 0;
	}
	~CDerived2(){}

	void ShowMessage()
	{
		printf("Derived2Class\n");
	}
	void ShowDerived2()
	{
		printf("show derived2\n");
	}

	void SetNumber(int num)
	{
		m_nNumber = num;
	}
	int GetNumber()
	{
		return m_nNumber;
	}
//tolua_end
protected:
	int m_nNumber;
//tolua_begin
};

extern CDerived1 * toDerived1(void *p);
extern CDerived2 & toDerived2(void *p);
//tolua_end
#endif